<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- update -->
    <script>
        Array.prototype.student=function (res){
            if(Array.isArray(res)){
                var arr = res.sort((a,b)=>{
                    return a-b;
                }) 
                console.log(arr)
            }
        }
        var str = [7,5,9];
        str.student(str)
    </script>
</body>
</html>